package com.yuzhyn.hiops.app.utils.sh;

import com.yuzhyn.hiops.app.utils.sh.pojo.WebSSHData;
import com.yuzhyn.azylee.core.threads.sleeps.Sleep;

public class shmanTest {
    public static void main(String[] args) {

        shman shman = new shman();
        shman.initConnection();
        WebSSHData webSSHData = new WebSSHData();

        Thread thread01 = new Thread(() -> {
            webSSHData.setHost("192.168.81.139");
            webSSHData.setPort(22);
            webSSHData.setUsername("root");
            webSSHData.setPassword("yuzhyn");
            webSSHData.setOperate(ConstantPool.WEBSSH_OPERATE_CONNECT);
            webSSHData.setCommand("");
            shman.recvHandle(webSSHData);
        });
        thread01.start();


        Thread thread02 = new Thread(() -> {
            Sleep.s(1);
            webSSHData.setOperate(ConstantPool.WEBSSH_OPERATE_COMMAND);
            webSSHData.setCommand("ll");
            Sleep.s(1);
            shman.recvHandle(webSSHData);
            Sleep.s(1);
            shman.recvHandle(webSSHData);
            Sleep.s(1);
            shman.recvHandle(webSSHData);
        });
        thread02.start();
    }
}
